<template>
<div>
  <h1>{{ msgA }}</h1>
  <button @click="handleClick">点击更新子组件A的信息</button>
</div>
 

</template>
<script>
export default{
  name:'CompomentA',
  data(){
    return{
      msgA:'这是子组件A'
    }
  },
  beforeCreate(){
    console.log('子组件A的beforecreate')
  },
  created(){
    console.log('子组件A的created')
  },
  beforeMount(){
    console.log('子组件A的beforeMount')
  },
  mounted(){
    console.log('子组件A的mounted')
  },
  beforeUpdate(){
    console.log('子组件A的beforeUpdate')
  },
  update(){
    console.log('子组件A的update')
  },
  beforeDestory(){
    console.log('子组件A的beforeDestory')
  },
  destoryed(){
    console.log('子组件A的destoryed')
  },
  methods:{
    handleClick(){
      this.msgA='这是A的新信息'
    }
  }
}
</script>